package com.lqk.prototype.improve;


/**
 * @author lqk
 * @date 2021/12/1 17:09
 */
public class Client {
    public static void main(String[] args) {
        Sheep sheep = new Sheep("tom", 1, "白色");

        sheep.setFriend(new Sheep("jack",2,"黑色"));


        Sheep sheep1 = (Sheep) sheep.clone();
        Sheep sheep2 = (Sheep) sheep.clone();
        Sheep sheep3 = (Sheep) sheep.clone();
        Sheep sheep4 = (Sheep) sheep.clone();

        System.out.println(sheep.toString() + sheep.getFriend().hashCode());
        System.out.println(sheep1.toString() + sheep1.getFriend().hashCode());
        System.out.println(sheep2.toString() + sheep2.getFriend().hashCode());
        System.out.println(sheep3.toString() + sheep3.getFriend().hashCode());
        System.out.println(sheep4.toString() + sheep4.getFriend().hashCode());
    }
}
